# @Time     : 2025-04-11 12:11
# @Author  : Fioman
# @Phone    : 13149920693
#  @Motto   : Talk is cheap,show me the code ^_^
import requests

from FirstLesson import crawler_config

requestHeaders = {
    "User-Agent": crawler_config.userAgent,
    "Cookie":'PSTM=1720495714; BAIDUID=2BCD321B91783764C3C2E6222400268E:FG=1; '
             'BIDUPSID=AFB6D0A37DFAFC4FCF5C002322DBE884; '
             'BAIDUID_BFESS=2BCD321B91783764C3C2E6222400268E:FG=1; '
             'H_WISE_SIDS=60854_60887_60875;'
             ' H_WISE_SIDS_BFESS=60854_60887_60875; __bid_n=19361745a244912d223a80; '
             'BAIDU_WISE_UID=wapp_1733098868261_783; '
             'ZFY=NarlajqrYIZYjMXB:Bwn1:AccsDufPhFC3SzDuht64EHc:C; '
             'BCLID_BFESS=10871115634889225598; '
             'BDSFRCVID_BFESS=fM4OJeC62i-i5BrJu-as8QWG1gK2g26TH6_nwZy_wVEY34Uf8VWhE'
             'G0PrM8g0KuhZ3YpogKK5mOTH6KF_2uxOjjg8UtVJeC6EG0Ptf8g0x5; H_BDCLCKID_'
             'SF_BFESS=JnCJoI-5fCD3fP36q45HMt00qxby26nxK5n9aJ5nQI5nhIJ5KfnM0M0Jjx7uJP'
             'TpfILHbJj8QUbmjRO206oay6O3LlO83h5bLb7qKl0MLPbM_p49Xq3YXJ-7DMnMBMPe'
             '52OnaIbx3fAKftnOM46JehL3346-35543bRTLnLy5KJYMDFGe5KMD5JBjaRb2bbXHDo'
             'XXRR5aTrjDCv8KMRcy4LdjG5tqP_JKb7Z5J6bQbnYhbc8DPJrefkH3-Aqy-6UbC6ZBpohbb'
             'QrMtQGX-cpQfbQ0h7OqP-jW2c33qAKWn7JOpkRbUnxy50rQRPH-Rv92DQMVU52QqcqE'
             'IQHQT3m5-5bbN3Ot6IHJnFqVIIbJIvbfP0k-4Q_b-FS-fFX5-CsL5TR2hcH0KLKjDQ83fToyx'
             'Dr3GQ3W6OBBJuJ0fT_Kfb1Mx7kKU68b5Dl2H3834LDBIbfBl5TtUJUeCnTDMRh-4DpMpjy'
             'KMnitKv9-pP2LpQrh459XP68bTkA5bjZKxtq3mkjbPbDfn028DKuD6-5ejcLeaAs-460aK_'
             'L3bRVKbk_jR-k-PnVenFOD-nZKxtqtDJGhJrNLqc4obb9MMF2Q5QXDG3i5bjnWncdWf822'
             'KbGhKK6ytTMDlFFKfj405OTLKFO0KJcbR_KHJvLhPJvyTtsXnO7tpOlXbrtXp7_2J0WStb'
             'Ky4oTjxL1Db3JKjvMtIFtVDLbtI_5bKDCenro5Jksqxb3aRctKCof3RrjHtboqKvIXjOcy4LdjG'
             '50e4Ft0jrZL66q-KnGSp0lbU4KbTjB3-Aqy-6fyj5dLMQNyC8MSJL93lJsQfbQ0h5uqP-jW5T'
             '3hDOw-n7JOpkGhfnxy5KUQRPH-Rv92DQMVU52QqcqEIQHQT3m5-5bbN3Ot6T2-DA__CI'
             'KtIbP; BDRCVFR[f6GzRAHcF8n]=-_EV5wtlMr0mh-8uz4WUvY; H_PS_PSSID=61027_6232'
             '5_62344_62637_62676_62330_62845_62867_62883_62886_62894_62928_62917_62920; '
             'BA_HECTOR=2ha4a020840k2l0lakag8h240tghb51jvevn323; ab_sr=1.0.1_NzJiNGZjMzY'
             '4MDE4YzU4NmQxNTZiMmE3YjE2NzhmOTM0NDRjMzg4ZmFiYjcxYzk0OWM4NzNjMz'
             'QzMGQxY2NiOWMzYTY2MWY3ZTQ0NDI2MTg0ZWI5ZjI2NGYzNDFkMGEzNTE4MmQ'
             'xMjEzOTJhNmMzMzA0OTAzNjY0ZDJlMjc2NThjOGVjMTM0NDMzMjZiNzRhMWYxMD'
             'VjNzk0ZTNhYmJmZDQwZTdhNzBjMjNlMDhjZjI2ZTg3ODA1NzczYzE5YmJlZmRjMzdlNG'
             'MzMzFiYmM2YjQxZDJhYTdiZGZkOTYyNTM=; RT="z=1&dm=baidu.com&si=8f93282a-1c34'
             '-4d9a-82b4-52bb806e3f2e&ss=m9c9qx3p&sl=1&tt=18x&bcn=https%3A%2F%2Ffclog.baidu.c'
             'om%2Flog%2Fweirwood%3Ftype%3Dperf&ld=214"'
}
urlBase = "https://fanyi.baidu.com/sug"
s = input("请输入你要翻译的英文单词")
postData = {
    "kw":s
}
print(postData)
# 发送post请求
resp = requests.post(urlBase, data=postData,headers=requestHeaders)
print(resp.json())
